package com.martini.satoken01.config;

import com.martini.satoken01.model.mapper.OnlineInfoModelMapper;
import com.martini.satoken01.model.mapper.SysUserEntityMapper;
import com.martini.satoken01.model.mapper.impl.BeanUtilsOnlineInfoModelMapper;
import com.martini.satoken01.model.mapper.impl.BeanUtilsSysUserEntityMapperImpl;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;

/**
 * @author martini at 2021/12/19 10:30
 */
@SpringBootConfiguration
public class EntityMapperConfiguration {
    @Bean
    @ConditionalOnMissingBean
    public SysUserEntityMapper sysUserEntityMapper() {
        return new BeanUtilsSysUserEntityMapperImpl();
    }

    @Bean
    @ConditionalOnMissingBean
    public OnlineInfoModelMapper onlineInfoModelMapper() {
        return new BeanUtilsOnlineInfoModelMapper();
    }
}
